package org.lennon.log.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.lennon.log.model.LogModel;

public interface LogMapper {

	public List<LogModel> queryLogList(LogModel log);
	public void saveLog(LogModel log);
	
	public void saveLogFileHistory(@Param("fileName")String fileName);
	
	public List<Map<String,Integer>> getLineData(@Param("project")String project,@Param("beginDate")long beginDate,@Param("endDate")long endDate);
	
	public List<String> getProjectList();
	
	public List<Map<String,Integer>> getReqMethodData(@Param("project")String project,@Param("beginDate")long beginDate,@Param("endDate")long endDate);
	public List<Map<String,Integer>> getReqResultData(@Param("project")String project,@Param("beginDate")long beginDate,@Param("endDate")long endDate);
	public List<Map<String,Integer>> getReqTypeData(@Param("project")String project,@Param("beginDate")long beginDate,@Param("endDate")long endDate);
	
	public List<Map<String,Integer>> getTopVisit(@Param("project")String project,@Param("number")int number);
	public List<Map<String,Integer>> getTopBytes(@Param("project")String project,@Param("number")int number);
	
	public List<Map<String,Object>> getTopPage(@Param("project")String project,@Param("number")int number);
	public List<Map<String,Object>> getTopSlowPage(@Param("project")String project,@Param("number")int number);
}
